package com.wondertek.poms.init.service.impl;

import org.springframework.context.annotation.Scope;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import com.wondertek.poms.common.service.impl.ServiceImpl;
import com.wondertek.poms.common.utils.CopyUtils;
import com.wondertek.poms.init.po.InitDataHis;
import com.wondertek.poms.init.service.IInitDataHisService;

/**
 * <p><b>InitDataHisServiceImpl Description:</b> 初始化历史表 service层实现 </p>
 * @author 窦再兴
 * <p><b>DATE</b> 2020-03-30 18:57:15</p>
 */
@Service
@Scope("prototype")
@Transactional(readOnly = false)
public class InitDataHisServiceImpl extends ServiceImpl<InitDataHis, Long> implements IInitDataHisService {
	@Override
	public InitDataHis deleteLogic(Long id) {
		return null;
	}

	@Override
	public InitDataHis merge(InitDataHis model) {
		InitDataHis dbo = jpaRepository.getOne(model.getId());
		CopyUtils.copyProperties(model, dbo);
		return jpaRepository.save(dbo);
	}
}